# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AndroidManagement.V1.Model.ScreenBrightnessSettings do
  @moduledoc """
  Controls for the screen brightness settings.

  ## Attributes

  *   `screenBrightness` (*type:* `integer()`, *default:* `nil`) - Optional. The screen brightness between 1 and 255 where 1 is the lowest and 255 is the highest brightness. A value of 0 (default) means no screen brightness set. Any other value is rejected. screenBrightnessMode must be either BRIGHTNESS_AUTOMATIC or BRIGHTNESS_FIXED to set this. Supported on Android 9 and above on fully managed devices. A NonComplianceDetail with API_LEVEL is reported if the Android version is less than 9. Supported on work profiles on company-owned devices on Android 15 and above.
  *   `screenBrightnessMode` (*type:* `String.t`, *default:* `nil`) - Optional. Controls the screen brightness mode.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :screenBrightness => integer() | nil,
          :screenBrightnessMode => String.t() | nil
        }

  field(:screenBrightness)
  field(:screenBrightnessMode)
end

defimpl Poison.Decoder, for: GoogleApi.AndroidManagement.V1.Model.ScreenBrightnessSettings do
  def decode(value, options) do
    GoogleApi.AndroidManagement.V1.Model.ScreenBrightnessSettings.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AndroidManagement.V1.Model.ScreenBrightnessSettings do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
